#include <stdio.h>
int main()
{
	int a[11] = { 1,23,34,45,76,87,98,104,120,145 };
	int k=0;
	scanf_s("%d",& k);
	int i;
	int x, y,q;
	if (k > a[9])
		a[10] = k;
	for(i=0;i<=9;i++)
		if (a[i] > k)
		{
			x = a[i];
			a[i] = k;
			for (q = i + 1; q <= 10; q++)
			{
				y = a[q];
				a[q] = x;
				x = y;  

			}
			break;
		}
	for (i = 0; i <= 10; i++)
		printf("%d ", a[i]);
	return 0;
}